<template>
  <div v-if="data.length > 0">
    <div v-for="item in data" :key="item._id">
      <div class="h200" @click="Todetails(item._id)">
        <div class="p10">
          <van-row justify="space-between">
            <van-col span="18">
              <div class="txt1">
                <b>
                  {{ item.title }}
                </b>
              </div>
              <div class="txt2">
                {{ item.settlement }}
              </div>
              <div class="txt3">
                {{ item.jobNum + "人" }}
                {{ item.jobTime + " " + item.jobAddress }}
              </div>
            </van-col>
            <van-col span="6">
              <div class="gao">推荐星数</div>
              <div class="gao1">
                <van-rate :size="13"  color="#ffd21e" v-model="item.companyData.score" readonly />
              </div>
              <div class="a3">
                {{ item.price + item.unit }}
              </div>
            </van-col>
          </van-row>
        </div>
      </div>
    </div>
  </div>

  <van-empty description="暂无内容" v-else />
</template>

<script>
import $router from "../../router/index";
export default {
  name:"ProLiets",
  props: {
    data: Array,
  },
  setup() {
    function Todetails(id) {
      $router.push({ path: "/details", query: { id: id } });
    }

    return { Todetails };
  },
};
</script>

<style lang="scss" scoped>

.h200 {
  height: 100px;
  background: #f7f6f6;
  width: 94%;
  border-radius: 10px;
  margin: 15px auto;
  // border: 1px solid #e8d31b;
}

.p10 {
  padding: 10px;
}
.center {
  text-align: center;
  padding: 5px;
  border-radius: 10px;
}
.txt1 {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txt2 {
  font-size: 13px;
  color: #ff7635;
  margin: 10px 0;
}

.txt3 {
  font-size: 12px;
  color: #a4a4a4;
}
.a3 {
  color: #ff7635;
  font-weight: 600;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.gao {
  font-size: 15px;
  border-radius: 10px;
  font-weight: 600;
  color: red;
  text-align: center;
}
.gao1 {
// margin: 1px 0;
display: flex;
 height: 32px;
  align-items: center;
}
</style>